package request

// ProductList 商品列表请求参数
type ProductList struct {
	PriceMin    int64  `form:"priceMin" json:"priceMin" xml:"priceMin"`
	PriceMax    int64  `form:"priceMax" json:"priceMax" xml:"priceMax"`
	IsHot       int64  `form:"isHot" json:"isHot" xml:"isHot"`
	IsNew       int64  `form:"isNew" json:"isNew" xml:"isNew"`
	TopCategory int64  `form:"topCategory" json:"topCategory" xml:"topCategory"`
	Pages       int64  `form:"pages" json:"pages" xml:"pages" binding:"required"`
	PagePerNums int64  `form:"pagePerNums" json:"pagePerNums" xml:"pagePerNums" binding:"required"`
	Keyword     string `form:"keyword" json:"keyword" xml:"keyword"`
}

// ProductCreateCatRequest 商品选购(加入购物车)
type ProductCreateCatRequest struct {
	ProductId int64 `form:"productId"  binding:"required"`
	Num       int64 `form:"num"  binding:"required"`
}

// DelCarProductRequest 从购物车中移除商品
type DelCarProductRequest struct {
	ProductId int64 `form:"productId"  binding:"required"`
}

// UpdateCarProductRequest 修改购物车中商品的数量
type UpdateCarProductRequest struct {
	ProductId int64 `form:"productId"  binding:"required"`
	Num       int64 `form:"num"  binding:"required"`
	Govern    int64 `form:"govern"  binding:"required"` //1为增 2为减
}

// CheckoutCarRequest 购物车结算 - 支持多商品或全部商品结算
type CheckoutCarRequest struct {
	ProductIds []int64 `form:"productIds" json:"productIds"` // 商品ID列表，为空则结算全部
}

// SnappedSpikesProductRequest 抢购秒杀商品
type SnappedSpikesProductRequest struct {
	ProductId int64 `form:"productId"  binding:"required"`
}

type CreateGroupRequest struct {
	ProductId int64 `form:"productId"  binding:"required"`
}

type GetGroupDetailRequest struct {
	GroupId int64 `form:"groupId"  binding:"required"`
}

type ParseTaoBaoRequest struct {
	TaoBaoUrl string `form:"taobaourl"  binding:"required"`
}

type JoinGroupRequest struct {
	GroupId int64 `form:"groupId"  binding:"required"`
}

type StartBargainRequest struct {
	ActivityId int64 `form:"activityId"  binding:"required"`
	ProductId  int64 `form:"productId"  binding:"required"`
}

type HelpBargainRequest struct {
	OrderId int64 `form:"orderId"  binding:"required"`
}

type QueryBargainProgressRequest struct {
	OrderId int64 `form:"orderId"  binding:"required"`
}

type BargainSettlementRequest struct {
	OrderId int64 `form:"orderId"  binding:"required"`
}

type SpikesProductListRequest struct {
	Pages       int64 `form:"pages" json:"pages" xml:"pages" binding:"required"`
	PagePerNums int64 `form:"pagePerNums" json:"pagePerNums" xml:"pagePerNums" binding:"required"`
}

type ProductInfoRequest struct {
	Id int64 `form:"id" json:"id" xml:"id"  binding:"required"`
}
